cmake_minimum_required(VERSION 3.5)

project(test-datamanagementprocessor LANGUAGES CXX C)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(PkgConfig REQUIRED)
pkg_check_modules(KYAISDK REQUIRED IMPORTED_TARGET kylin-ai-base)
pkg_check_modules(jsoncpp REQUIRED IMPORTED_TARGET jsoncpp)
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-unix-2.0)

add_executable(test-datamanagementprocessor main.cpp
    SegmentTokenizer.h
    knowledgebaseprocessorglue.h knowledgebaseprocessorglue.c)

include_directories(
    ${KYAISDK_INCLUDE_DIRS}
    ${GIO_INCLUDE_DIRS}
)

target_link_libraries(test-datamanagementprocessor
    PkgConfig::KYAISDK
    PkgConfig::jsoncpp
    PkgConfig::GIO
)


include(CMakePackageConfigHelpers)
include(GNUInstallDirs)

install(TARGETS test-datamanagementprocessor
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
